<template>
  <div class="ly-dropdown-item" @click="onItemClick">
    <slot></slot>
  </div>
</template>
<script>
export default {
  name:'lyDropdownItem',
  props:{
    command:{
      type:[String,Number],
      default:''
    }
  },
  methods:{
    onItemClick(){
      this.$bus.emit('itemClick',this.command)
    }
  }
}
</script>
<style lang="scss">
  .ly-dropdown-item{
    line-height: 36px;
    padding: 0 20px;
    margin: 0;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    &:hover{
      background-color: #ecf5ff;
      color: #66b1ff;
    }
  }
</style>